#define _CRT_SECURE_NO_WARNINGS 1
#include"NormalTree.h"

void test_01(void)
{
	BTNode* n1 = (BTNode*)malloc(sizeof(BTNode));
	BTNode* n2 = (BTNode*)malloc(sizeof(BTNode));
	BTNode* n3 = (BTNode*)malloc(sizeof(BTNode));
	BTNode* n4 = (BTNode*)malloc(sizeof(BTNode));
	BTNode* n5 = (BTNode*)malloc(sizeof(BTNode));
	BTNode* n6 = (BTNode*)malloc(sizeof(BTNode));

	n1->date = 1;
	n2->date = 2;
	n3->date = 3;
	n4->date = 4;
	n5->date = 5;
	n6->date = 6;

	n1->left = n2;
	n1->right = n4;

	n2->left = n3;
	n2->right = NULL;

	n3->left = n3->right = NULL;

	n4->left = n5;
	n4->right = n6;

	n5->left = n5->right = NULL;
	n6->left = n6->right = NULL;

	printf("%d \n", FindK(n1,2)->date);
	TreeDestory(n1);
}


int main()
{
	test_01();

	return 0;
}